package com.huarui.purchaseOrder.service.provider.taskOwner;

import java.util.List;
import com.huarui.purchaseOrder.model.PurOrSaleOrder;
import com.huarui.task.model.TaskOwner;
import com.huarui.task.service.provider.CreateTaskOwnerHandler;
import com.huarui.task.service.provider.TaskOwnerProvider;
import com.huarui.task.service.provider.UpdateTaskOwnerHandler;

public class PurOrSaleUpdateToSubmitTaskOwnerProviderImpl implements TaskOwnerProvider, CreateTaskOwnerHandler, UpdateTaskOwnerHandler{

	private TaskOwner taskOwner;
	
	private PurOrSaleOrder orders;
	
	public PurOrSaleUpdateToSubmitTaskOwnerProviderImpl(TaskOwner taskOwner, PurOrSaleOrder orders) {
		super();
		this.taskOwner = taskOwner;
		this.orders = orders;
	}
	
	@Override
	public List<TaskOwner> createTaskOwner() {
		List<TaskOwner> list = PurOrSaleTaskOwnerUtil.saveAnotherTaskOwner(orders);
		return list;
	}

	@Override
	public TaskOwner updateTaskOwner() {
		return PurOrSaleTaskOwnerUtil.updateRemark(taskOwner, orders);
	}
	
}
